﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rotempco.BaseClass.Objects.AttributeStoreObjects;
using Rotempco.BaseClass.Objects.Enums;

namespace Rotempco.BaseClass.Managers
{
    public class ActiveLanguagesManager
    {
        public ActiveLanguages GetActiveLanguages()
        {
            ActiveLanguages ActiveLanguages = Factory.SiteAttributeStore.Get<ActiveLanguages>();

            if (ActiveLanguages == null)
            {
                ActiveLanguages = new ActiveLanguages();
                ActiveLanguages.ActiveLangaugeList.Add(LanguageTypeEnum.EN);
            }

            return ActiveLanguages;
        }

        public void SetActiveLanguages(ActiveLanguages ActiveLanguages)
        {
            Factory.SiteAttributeStore.WriteToDB<ActiveLanguages>(ActiveLanguages);
        }
    }
}

